Ext.define('AmpleHarvest.views.flatfile.center',
{
	extend				: 'Ext.panel.Panel',
	alias				: 'widget.ampleharvest-views-flatfile-center',
	dockedItems			: [{
		xtype	: 'toolbar',
		dock	: 'top',
		items	: []
	}],
	statics				:
	{
		C_STR_PRINT_SERVER	: "7B0474F4-F829-4DEC-9EA4-6C4E8B58293B"
	},
	border				: 0,
	layout				: "border",
	bubbleEvents	: [
	     'genParentLink',
	     'maximizeContent',
	     'contractContent',
	     'printContent'
	],

	initComponent		: function()
	{
		this.tools =
		[
				{
					type	: "maximize",
					tooltip	: "Collapse all panels",
					scope	: this,
					handler	: function()
					{
						this.fireEvent('maximizeContent', this);
					}
				},
				{
					type	: "restore",
					tooltip	: "Expand all panels",
					scope	: this,
					handler	: function()
					{
						this.fireEvent('contractContent', this);
					}
				},
				{
					type	: "print",
					tooltip	: "Print",
					scope	: this,
					handler	: function()
					{
						this.fireEvent('printContent', this);
					}
				}

		];
		
//		this.m_obj_ParentButton = Ext.create(
//				"AmpleHarvest.objects.breadcrumbs.cGoToParent",
//				{
//					ahCaller			: this,
//					m_str_id			: this.m_str_id
//				}
//		);
		this.m_obj_TranslateButton = Ext.create("AmpleHarvest.objects.translate.button",
				{
					ahCaller : this
				});
		
//		this.m_obj_TranslateButton.hide();

		this.items =
		[

		];
		
		
		this.callParent();
		this.down("toolbar").add(this.m_obj_TranslateButton);

	},

	
	//TODO : get pushed HL working
	push_highlight		: function(hl_object, str_Class, str_Attrib)
	{
		this.m_obj_ArticleWin.highlight(hl_object, str_Class, str_Attrib);
	},

	print				: function()
	{
		m_obj_AmpleHarvest_ViewPort
				.fireEvent(
						AmpleHarvest.eventHandler.cWindowEvents.C_STR_EVENT_REDIRECT_NEW_WIN,
						this.self.C_STR_PRINT_SERVER, this.m_str_id
				);
	},
	activateNext		: function(str_ServerID, str_ID)
	{
		this.m_obj_NextButton.m_str_PageID = str_ID;
		this.m_obj_NextButton.m_str_ServerID = str_ServerID;
		this.m_obj_NextButton.show();
	},

	activatePrevious	: function(str_ServerID, str_ID)
	{
		this.m_obj_PreviousButton.m_str_PageID = str_ID;
		this.m_obj_PreviousButton.m_str_ServerID = str_ServerID;
		this.m_obj_PreviousButton.show();
	}
}
);
